home *** CD-ROM | disk | FTP | other *** search
- /*
- * File: RequestDispatcher.h
- *
- * Contains: xxx put contents here xxx
- *
- * Written by: Rick Violet
- *
- * Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
- *
- * Change History (most recent first):
- *
- * 11/18/92 RV xxx put comment here xxx
- *
- * To Do:
- */
-
- #ifndef __RequestDispatcher__
- #define __RequestDispatcher__
-
- #ifndef __VUAE__
- #include "VUAE.h"
- #endif
-
- #ifndef __Object__
- #include "Object.h"
- #endif
-
- #ifndef __List__
- #include "List.h"
- #endif
-
- #ifndef __Service__
- #include "Service.h"
- #endif
-
- #ifndef __Request__
- #include "Request.h"
- #endif
-
- #ifndef __RequestDispatcherResources__
- #include "RequestDispatcher.r.h"
- #endif
-
- #ifndef __THREADS__
- #include "Threads.h"
- #endif
-
- typedef struct VersResRec
- {
- char major;
- char minor;
- char stage;
- char nonfinal;
- short countryCode;
- char versStr[512];
- } VersResRec;
- //typedef struct VersResRec VersResRec;
- typedef VersResRec *VersResRecPtr, **VersResRecHdl;
-
- typedef char* CharPtr;
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // RequestDispatcher class - This class dispatches the incoming
- // Service Requests the appropriate Service object
- //—————————————————————————————————————————————————————————————————————————————————————
- class RequestDispatcher : public Object
- {
- /*SBR Hacked this in 10/16/94 */
- private: List* fActiveRequestList; //———— threaded Requests in process
-
- private: List* fServices;
- private: List* fRequestQueue;
-
- /*SBR Hacked this out, unused! (proper one is Application->fSystem7) 10/16/94 */
- //private: Boolean fRunningInSystem7;
-
- //private: Request* fReqBeingProcessed;
-
- public: RequestDispatcher();
- public: virtual ~RequestDispatcher(void);
-
- public: void ConstructAllServiceObjects();
-
- /*SBR Hacked this in 05/23/94 */
- public: void ConstructServicesMenu();
-
- public: void DoOneRequest();
- public: void QueueRequest( Request* pReq );
-
- /*SBR Hacked this out 10/16/94 */
- //public: Boolean CurrentlyProcessingARequest(){ return ( fReqBeingProcessed != nil ); };
- //public: Request* GetCurrentRequest(){ return fReqBeingProcessed; };
- //public: void CancelCurrentRequest();
-
- /*SBR Hacked this in 10/16/94 */
- public: Boolean CancelAllRequests();
- public: void ProcessRequest( Request* pReq );
-
- public: void DoCancelReq( Request* pReq );
- private: void DoGetToolVersReq( Request* pReq );
- private: void DoGetToolServicesReq( Request* pReq );
- private: void DoServiceSupportedReq( Request* pReq );
- private: void DoInitializeReq( Request* pReq );
-
- /*SBR Hacked this in 10/16/94 */
- public: void DoRequests();
- public: OSErr CreateNewRequestThread( Request* pReq );
- public: void RequestIsDone( Request* pReq );
-
- public: void DispatchCustomRequest( Request* pReq );
-
- private: void GetToolName( char* pText );
- private: void GetToolVersionString( char* pText );
-
- public: void ResetAllTimeOutCounters();
- };
-
- /*SBR Hacked this in 10/16/94 as entry point for new Request threads*/
- void* ServiceProcessRequestThread( Request* pReq );
-
- #endif
-